Conversation
A new "Markdown" filter parses a plain #/## markdown document into the
Set/Question/Part model:
- `#` -> new question (heading is the title)
- `##` -> new part
- `## Solution` -> worked solution for the current part (or the whole
question if it has no parts)
- `-a answers.md` -> `#` advances to the next question, body blocks become
worked solutions
This is the intermediate contract the wizard will emit and hand back for
review. runner() now runs in2lambda.validation.check_markdown over any
markdown input and echoes a warning per math-delimiter problem (non-fatal).
docs/source/filters.py learns to document a filter whose example is
example.md (shown inline) instead of example.tex (rendered to a PDF), so the
new filter is picked up by the existing autosummary generation.
Structure adapted from the Markdown2Lambda branch; the elaborate
\st/\fa/\ws/*** syntax there is dropped since the Set/Question/Part model
only has question text, part text and one worked solution per part.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_017VXb8aZqgFBjoeuuddjW6r
|
Notes from reviewing this before merge. I ran this branch's filter (Python 3.11, pandoc installed) over a small probe file, and the structure of the source doesn't survive. Probe file: # Probe question
Some setup text.
## Part one
Do this, using:
- first item
- second item
## Solution
First step.
---
Second step after a separator.Result from Two things to note: Lists (and tables) are flattened.
The fix I'd suggest is not to hand the body to pandoc at all: split the raw text on the Worth deciding too whether the |
- Preserve `---` horizontal rules in Markdown question sets as solution step separators. - Improve Markdown processing of inline elements, allowing lists, tables, and other markup to remain intact. - Replace `pf.Str` with `pf.RawInline` for better fidelity when serializing inline Markdown elements (e.g., bold/italic text, images, math expressions). - Update test cases to verify new behavior with horizontal rules and enhanced content parsing.
A new
Markdownfilter parses a plain#/##markdown document into theSet/Question/Partmodel:#→ new question (heading is the title)##→ new part## Solution→ worked solution for the current part (or the whole question if it has no parts)-a answers.md→#advances to the next question, body blocks become worked solutionsThis is the intermediate contract the wizard emits and hands back for review.
runner()now runscheck_markdown()over any markdown input and echoes a non-fatal warning per math-delimiter problem.docs/source/filters.pylearns to document a filter whose example isexample.md(shown inline) instead ofexample.tex(rendered to a PDF).Structure adapted from the
Markdown2Lambdabranch; the elaborate\st/\fa/\ws/***syntax is dropped since the model only has question text, part text and one worked solution per part.Stack: validator ← markdown-filter ← cli-group ← …
Base:
validator— #22.🤖 Generated with Claude Code